package pri.zxx.excelgenerate.dataentity.entity;

public enum PredictionTypeEnum {

    STARTING_PIGS("startingPigs", "断奶仔猪"),
    GROWING_FINISHING("growingFinishing", "生长育肥猪"),
    GESTATING_SOWS("gestatingSows", "妊娠母猪"),
    LACTATING_SOWS("lactatingSows", "哺乳母猪");

    final String key;
    final String value;

    public String getKey() {
        return this.key;
    }

    public String getValue() {
        return this.value;
    }

    PredictionTypeEnum(final String key, final String value) {
        this.key = key;
        this.value = value;
    }

    public static PredictionTypeEnum getBykey(String key) {
        for (PredictionTypeEnum predictionTypeEnum : values()) {
            if (predictionTypeEnum.getKey().equals(key)) {
                return predictionTypeEnum;
            }
        }
        return null;
    }
}